<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: LegController&lt; T &gt; Class Template Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d0/d96/class_leg_controller.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="../../d8/de0/class_leg_controller-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">LegController&lt; T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Inheritance diagram for LegController&lt; T &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../df/d5c/class_leg_controller__inherit__graph.png" border="0" usemap="#_leg_controller_3_01_t_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="_leg_controller_3_01_t_01_4_inherit__map" id="_leg_controller_3_01_t_01_4_inherit__map">
</map>
</div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Collaboration diagram for LegController&lt; T &gt;:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d4/d54/class_leg_controller__coll__graph.png" border="0" usemap="#_leg_controller_3_01_t_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="_leg_controller_3_01_t_01_4_coll__map" id="_leg_controller_3_01_t_01_4_coll__map">
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1767825f42ba1f1d6c359886c7b2a342"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#a1767825f42ba1f1d6c359886c7b2a342">LegController</a> (<a class="el" href="../../dc/d66/class_quadruped.html">Quadruped</a>&lt; T &gt; &amp;quad)</td></tr>
<tr class="separator:a1767825f42ba1f1d6c359886c7b2a342"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fc971360d5ce54469d219c6aa4b51e4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#a8fc971360d5ce54469d219c6aa4b51e4">zeroCommand</a> ()</td></tr>
<tr class="separator:a8fc971360d5ce54469d219c6aa4b51e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1c503edfcb89ba3c93aa63df579fa45"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#ad1c503edfcb89ba3c93aa63df579fa45">edampCommand</a> (<a class="el" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39">RobotType</a> robot, T gain)</td></tr>
<tr class="separator:ad1c503edfcb89ba3c93aa63df579fa45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec19eaa7a02abc15dba5106b82c5a8bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#aec19eaa7a02abc15dba5106b82c5a8bc">updateData</a> (const <a class="el" href="../../d5/d09/struct_spi_data.html">SpiData</a> *spiData)</td></tr>
<tr class="separator:aec19eaa7a02abc15dba5106b82c5a8bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9989702479e649e0d700a29be7e3185b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#a9989702479e649e0d700a29be7e3185b">updateData</a> (const <a class="el" href="../../de/de1/struct_ti_board_data.html">TiBoardData</a> *tiBoardData)</td></tr>
<tr class="separator:a9989702479e649e0d700a29be7e3185b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6ed2e91e7d6eb3af84b26db593483b9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#aa6ed2e91e7d6eb3af84b26db593483b9">updateCommand</a> (<a class="el" href="../../d0/ddd/struct_spi_command.html">SpiCommand</a> *spiCommand)</td></tr>
<tr class="separator:aa6ed2e91e7d6eb3af84b26db593483b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadd629fdf9a938a2ff4728b9292e4bc2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#aadd629fdf9a938a2ff4728b9292e4bc2">updateCommand</a> (<a class="el" href="../../d8/d03/struct_ti_board_command.html">TiBoardCommand</a> *tiBoardCommand)</td></tr>
<tr class="separator:aadd629fdf9a938a2ff4728b9292e4bc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47178c450659ac6793ac7a74351094e5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#a47178c450659ac6793ac7a74351094e5">setEnabled</a> (bool enabled)</td></tr>
<tr class="separator:a47178c450659ac6793ac7a74351094e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a14b7e0cb62942e70b787179b16f900"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#a2a14b7e0cb62942e70b787179b16f900">setLcm</a> (leg_control_data_lcmt *data, leg_control_command_lcmt *command)</td></tr>
<tr class="separator:a2a14b7e0cb62942e70b787179b16f900"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ccb52cceb6b9ac1a6ef86c823d81fa1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#a2ccb52cceb6b9ac1a6ef86c823d81fa1">setMaxTorqueCheetah3</a> (T tau)</td></tr>
<tr class="separator:a2ccb52cceb6b9ac1a6ef86c823d81fa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a0989efb2b62a34f7cef3f4cf29b6783f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d6a/struct_leg_controller_command.html">LegControllerCommand</a>&lt; T &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a> [4]</td></tr>
<tr class="separator:a0989efb2b62a34f7cef3f4cf29b6783f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc73b19fc4f23265cc857cb94b49f7b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/d6e/struct_leg_controller_data.html">LegControllerData</a>&lt; T &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a> [4]</td></tr>
<tr class="separator:acc73b19fc4f23265cc857cb94b49f7b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a53bbec70a5b55928d83c5e86fc76e8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/d66/class_quadruped.html">Quadruped</a>&lt; T &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#a1a53bbec70a5b55928d83c5e86fc76e8">_quadruped</a></td></tr>
<tr class="separator:a1a53bbec70a5b55928d83c5e86fc76e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9eaf3553d6578f0eb244fed996dd2fe9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#a9eaf3553d6578f0eb244fed996dd2fe9">_legsEnabled</a> = false</td></tr>
<tr class="separator:a9eaf3553d6578f0eb244fed996dd2fe9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d346be43debdb28740518f7a4de4f16"><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d96/class_leg_controller.html#a7d346be43debdb28740518f7a4de4f16">_maxTorque</a> = 0</td></tr>
<tr class="separator:a7d346be43debdb28740518f7a4de4f16"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br />
class LegController&lt; T &gt;</h3>


<p>Definition at line <a class="el" href="../../d0/d41/_leg_controller_8h_source.html#l00049">49</a> of file <a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1767825f42ba1f1d6c359886c7b2a342"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::<a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d66/class_quadruped.html">Quadruped</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>quad</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d0/d41/_leg_controller_8h_source.html#l00051">51</a> of file <a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                                    : <a class="code" href="../../d0/d96/class_leg_controller.html#a1a53bbec70a5b55928d83c5e86fc76e8">_quadruped</a>(quad) {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; data : <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>) data.setQuadruped(<a class="code" href="../../d0/d96/class_leg_controller.html#a1a53bbec70a5b55928d83c5e86fc76e8">_quadruped</a>);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  }</div><div class="ttc" id="class_leg_controller_html_acc73b19fc4f23265cc857cb94b49f7b3"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">LegController::datas</a></div><div class="ttdeci">LegControllerData&lt; T &gt; datas[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00070">LegController.h:70</a></div></div>
<div class="ttc" id="class_leg_controller_html_a1a53bbec70a5b55928d83c5e86fc76e8"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a1a53bbec70a5b55928d83c5e86fc76e8">LegController::_quadruped</a></div><div class="ttdeci">Quadruped&lt; T &gt; &amp; _quadruped</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00071">LegController.h:71</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad1c503edfcb89ba3c93aa63df579fa45"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::edampCommand </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39">RobotType</a>&#160;</td>
          <td class="paramname"><em>robot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>gain</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the leg to edamp. This overwrites all command data and generates an emergency damp command using the given gain. For the mini-cheetah, the edamp gain is Nm/(rad/s), and for the Cheetah 3 it is N/m. You still must call updateCommand for this command to end up in the low-level command data! </p>

<p>Definition at line <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html#l00062">62</a> of file <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html">LegController.cpp</a>.</p>

<p>References <a class="el" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">CHEETAH_3</a>.</p>
<div class="fragment"><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                                                           {</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  <a class="code" href="../../d0/d96/class_leg_controller.html#a8fc971360d5ce54469d219c6aa4b51e4">zeroCommand</a>();</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  <span class="keywordflow">if</span> (robot == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a>) {</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> axis = 0; axis &lt; 3; axis++) {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdCartesian(axis, axis) = gain;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;      }</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    }</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  } <span class="keywordflow">else</span> {  <span class="comment">// mini-cheetah</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> axis = 0; axis &lt; 3; axis++) {</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdJoint(axis, axis) = gain;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;      }</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    }</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  }</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a></div></div>
<div class="ttc" id="class_leg_controller_html_a8fc971360d5ce54469d219c6aa4b51e4"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a8fc971360d5ce54469d219c6aa4b51e4">LegController::zeroCommand</a></div><div class="ttdeci">void zeroCommand()</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d2d/_leg_controller_8cpp_source.html#l00048">LegController.cpp:48</a></div></div>
<div class="ttc" id="class_leg_controller_html_a0989efb2b62a34f7cef3f4cf29b6783f"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">LegController::commands</a></div><div class="ttdeci">LegControllerCommand&lt; T &gt; commands[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00069">LegController.h:69</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a47178c450659ac6793ac7a74351094e5"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::setEnabled </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d0/d41/_leg_controller_8h_source.html#l00061">61</a> of file <a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;{ <a class="code" href="../../d0/d96/class_leg_controller.html#a9eaf3553d6578f0eb244fed996dd2fe9">_legsEnabled</a> = enabled; };</div><div class="ttc" id="class_leg_controller_html_a9eaf3553d6578f0eb244fed996dd2fe9"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a9eaf3553d6578f0eb244fed996dd2fe9">LegController::_legsEnabled</a></div><div class="ttdeci">bool _legsEnabled</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00072">LegController.h:72</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-2" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-2-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d0/d96/class_leg_controller_a47178c450659ac6793ac7a74351094e5_icgraph.png" border="0" usemap="#d0/d96/class_leg_controller_a47178c450659ac6793ac7a74351094e5_icgraph" alt=""/></div>
<map name="d0/d96/class_leg_controller_a47178c450659ac6793ac7a74351094e5_icgraph" id="d0/d96/class_leg_controller_a47178c450659ac6793ac7a74351094e5_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a2a14b7e0cb62942e70b787179b16f900"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::setLcm </td>
          <td>(</td>
          <td class="paramtype">leg_control_data_lcmt *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">leg_control_command_lcmt *&#160;</td>
          <td class="paramname"><em>command</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html#l00202">202</a> of file <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html">LegController.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;                                                                                                  {</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> axis = 0; axis &lt; 3; axis++) {</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;            <span class="keywordtype">int</span> idx = leg*3 + axis;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            lcmData-&gt;q[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].q[axis];</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            lcmData-&gt;qd[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].qd[axis];</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            lcmData-&gt;p[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].p[axis];</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            lcmData-&gt;v[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].v[axis];</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            lcmData-&gt;tau_est[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].tauEstimate[axis];</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;            lcmCommand-&gt;tau_ff[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].tauFeedForward[axis];</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;            lcmCommand-&gt;f_ff[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].forceFeedForward[axis];</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            lcmCommand-&gt;q_des[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qDes[axis];</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;            lcmCommand-&gt;qd_des[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qdDes[axis];</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;            lcmCommand-&gt;p_des[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].pDes[axis];</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;            lcmCommand-&gt;v_des[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].vDes[axis];</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;            lcmCommand-&gt;kp_cartesian[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kpCartesian(axis, axis);</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;            lcmCommand-&gt;kd_cartesian[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdCartesian(axis, axis);</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;            lcmCommand-&gt;kp_joint[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kpJoint(axis, axis);</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            lcmCommand-&gt;kd_joint[idx] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdJoint(axis, axis);</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        }</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    }</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;}</div><div class="ttc" id="class_leg_controller_html_acc73b19fc4f23265cc857cb94b49f7b3"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">LegController::datas</a></div><div class="ttdeci">LegControllerData&lt; T &gt; datas[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00070">LegController.h:70</a></div></div>
<div class="ttc" id="class_leg_controller_html_a0989efb2b62a34f7cef3f4cf29b6783f"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">LegController::commands</a></div><div class="ttdeci">LegControllerCommand&lt; T &gt; commands[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00069">LegController.h:69</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-3" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-3-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-3-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-3-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d0/d96/class_leg_controller_a2a14b7e0cb62942e70b787179b16f900_icgraph.png" border="0" usemap="#d0/d96/class_leg_controller_a2a14b7e0cb62942e70b787179b16f900_icgraph" alt=""/></div>
<map name="d0/d96/class_leg_controller_a2a14b7e0cb62942e70b787179b16f900_icgraph" id="d0/d96/class_leg_controller_a2a14b7e0cb62942e70b787179b16f900_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a2ccb52cceb6b9ac1a6ef86c823d81fa1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::setMaxTorqueCheetah3 </td>
          <td>(</td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>tau</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the maximum torque. This only works on cheetah 3! </p>

<p>Definition at line <a class="el" href="../../d0/d41/_leg_controller_8h_source.html#l00067">67</a> of file <a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;{ <a class="code" href="../../d0/d96/class_leg_controller.html#a7d346be43debdb28740518f7a4de4f16">_maxTorque</a> = tau; }</div><div class="ttc" id="class_leg_controller_html_a7d346be43debdb28740518f7a4de4f16"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a7d346be43debdb28740518f7a4de4f16">LegController::_maxTorque</a></div><div class="ttdeci">T _maxTorque</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00073">LegController.h:73</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-4" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-4-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-4-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-4-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d0/d96/class_leg_controller_a2ccb52cceb6b9ac1a6ef86c823d81fa1_icgraph.png" border="0" usemap="#d0/d96/class_leg_controller_a2ccb52cceb6b9ac1a6ef86c823d81fa1_icgraph" alt=""/></div>
<map name="d0/d96/class_leg_controller_a2ccb52cceb6b9ac1a6ef86c823d81fa1_icgraph" id="d0/d96/class_leg_controller_a2ccb52cceb6b9ac1a6ef86c823d81fa1_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aa6ed2e91e7d6eb3af84b26db593483b9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::updateCommand </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d0/ddd/struct_spi_command.html">SpiCommand</a> *&#160;</td>
          <td class="paramname"><em>spiCommand</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Update the "leg command" for the SPIne board message </p>

<p>Definition at line <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html#l00126">126</a> of file <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html">LegController.cpp</a>.</p>

<p>References <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00031">SpiCommand::flags</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00023">SpiCommand::kd_abad</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00024">SpiCommand::kd_hip</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00025">SpiCommand::kd_knee</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00019">SpiCommand::kp_abad</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00020">SpiCommand::kp_hip</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00021">SpiCommand::kp_knee</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00011">SpiCommand::q_des_abad</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00012">SpiCommand::q_des_hip</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00013">SpiCommand::q_des_knee</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00015">SpiCommand::qd_des_abad</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00016">SpiCommand::qd_des_hip</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00017">SpiCommand::qd_des_knee</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00027">SpiCommand::tau_abad_ff</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00028">SpiCommand::tau_hip_ff</a>, and <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00029">SpiCommand::tau_knee_ff</a>.</p>
<div class="fragment"><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                                                           {</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="comment">// tauFF</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;T&gt;</a> legTorque = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].tauFeedForward;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="comment">// forceFF</span></div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;T&gt;</a> footForce = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].forceFeedForward;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="comment">// cartesian PD</span></div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    footForce +=</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kpCartesian * (<a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].pDes - <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].p);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    footForce +=</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdCartesian * (<a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].vDes - <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].v);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="comment">// Torque</span></div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    legTorque += <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].J.transpose() * footForce;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <span class="comment">// set command:</span></div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a0a8836e693a20a96700f43a7f2c00104">tau_abad_ff</a>[leg] = legTorque(0);</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a830f6dfc6db3c67b2984a71e19268d9e">tau_hip_ff</a>[leg] = legTorque(1);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a1fdaa6a451f4e90245c96e5b04b406b2">tau_knee_ff</a>[leg] = legTorque(2);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <span class="comment">// joint space pd</span></div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="comment">// joint space PD</span></div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#aa82f69e2d66509f39aa3a55cc2112747">kd_abad</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdJoint(0, 0);</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#ac5037bdfd25b3c123dac542c221b873b">kd_hip</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdJoint(1, 1);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a874c022fdc0e4534e1f3ab0e754f554b">kd_knee</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdJoint(2, 2);</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a5d48cdb5f3f29c3414109af53db05817">kp_abad</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kpJoint(0, 0);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a17e6d0a97149a586d66f49e97778d8aa">kp_hip</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kpJoint(1, 1);</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#ab82f39377b32b65c3844454aff9eaaf5">kp_knee</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kpJoint(2, 2);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a1ad7c5a3522786056f16a6758916d08a">q_des_abad</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qDes(0);</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a39d8f62479fdc6fd8f1d45ac6e3fa801">q_des_hip</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qDes(1);</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a4bfca37c37e047fbfbc7565dd2ff7c21">q_des_knee</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qDes(2);</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#aa4c7007b0e88ea1a64044d1f82195a5e">qd_des_abad</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qdDes(0);</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a15d419dc5e1d3ea164a6c87994745fb5">qd_des_hip</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qdDes(1);</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a19da2d5bb1f0ea785ed9977e5a6f563b">qd_des_knee</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qdDes(2);</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="comment">// estimate torque</span></div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].tauEstimate =</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        legTorque +</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kpJoint * (<a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qDes - <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].q) +</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdJoint * (<a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qdDes - <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].qd);</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    spiCommand-&gt;<a class="code" href="../../d0/ddd/struct_spi_command.html#a1d9f9c2ca45d5b7cb552b14473ca9fe5">flags</a>[leg] = <a class="code" href="../../d0/d96/class_leg_controller.html#a9eaf3553d6578f0eb244fed996dd2fe9">_legsEnabled</a> ? 1 : 0;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;  }</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;}</div><div class="ttc" id="struct_spi_command_html_a19da2d5bb1f0ea785ed9977e5a6f563b"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a19da2d5bb1f0ea785ed9977e5a6f563b">SpiCommand::qd_des_knee</a></div><div class="ttdeci">float qd_des_knee[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00017">SpineBoard.h:17</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="struct_spi_command_html_a0a8836e693a20a96700f43a7f2c00104"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a0a8836e693a20a96700f43a7f2c00104">SpiCommand::tau_abad_ff</a></div><div class="ttdeci">float tau_abad_ff[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00027">SpineBoard.h:27</a></div></div>
<div class="ttc" id="struct_spi_command_html_ac5037bdfd25b3c123dac542c221b873b"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#ac5037bdfd25b3c123dac542c221b873b">SpiCommand::kd_hip</a></div><div class="ttdeci">float kd_hip[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00024">SpineBoard.h:24</a></div></div>
<div class="ttc" id="struct_spi_command_html_a874c022fdc0e4534e1f3ab0e754f554b"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a874c022fdc0e4534e1f3ab0e754f554b">SpiCommand::kd_knee</a></div><div class="ttdeci">float kd_knee[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00025">SpineBoard.h:25</a></div></div>
<div class="ttc" id="struct_spi_command_html_a4bfca37c37e047fbfbc7565dd2ff7c21"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a4bfca37c37e047fbfbc7565dd2ff7c21">SpiCommand::q_des_knee</a></div><div class="ttdeci">float q_des_knee[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00013">SpineBoard.h:13</a></div></div>
<div class="ttc" id="struct_spi_command_html_aa82f69e2d66509f39aa3a55cc2112747"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#aa82f69e2d66509f39aa3a55cc2112747">SpiCommand::kd_abad</a></div><div class="ttdeci">float kd_abad[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00023">SpineBoard.h:23</a></div></div>
<div class="ttc" id="class_leg_controller_html_acc73b19fc4f23265cc857cb94b49f7b3"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">LegController::datas</a></div><div class="ttdeci">LegControllerData&lt; T &gt; datas[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00070">LegController.h:70</a></div></div>
<div class="ttc" id="struct_spi_command_html_a1fdaa6a451f4e90245c96e5b04b406b2"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a1fdaa6a451f4e90245c96e5b04b406b2">SpiCommand::tau_knee_ff</a></div><div class="ttdeci">float tau_knee_ff[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00029">SpineBoard.h:29</a></div></div>
<div class="ttc" id="struct_spi_command_html_a1ad7c5a3522786056f16a6758916d08a"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a1ad7c5a3522786056f16a6758916d08a">SpiCommand::q_des_abad</a></div><div class="ttdeci">float q_des_abad[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00011">SpineBoard.h:11</a></div></div>
<div class="ttc" id="struct_spi_command_html_ab82f39377b32b65c3844454aff9eaaf5"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#ab82f39377b32b65c3844454aff9eaaf5">SpiCommand::kp_knee</a></div><div class="ttdeci">float kp_knee[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00021">SpineBoard.h:21</a></div></div>
<div class="ttc" id="struct_spi_command_html_a39d8f62479fdc6fd8f1d45ac6e3fa801"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a39d8f62479fdc6fd8f1d45ac6e3fa801">SpiCommand::q_des_hip</a></div><div class="ttdeci">float q_des_hip[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00012">SpineBoard.h:12</a></div></div>
<div class="ttc" id="struct_spi_command_html_a15d419dc5e1d3ea164a6c87994745fb5"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a15d419dc5e1d3ea164a6c87994745fb5">SpiCommand::qd_des_hip</a></div><div class="ttdeci">float qd_des_hip[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00016">SpineBoard.h:16</a></div></div>
<div class="ttc" id="struct_spi_command_html_a1d9f9c2ca45d5b7cb552b14473ca9fe5"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a1d9f9c2ca45d5b7cb552b14473ca9fe5">SpiCommand::flags</a></div><div class="ttdeci">int32_t flags[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00031">SpineBoard.h:31</a></div></div>
<div class="ttc" id="struct_spi_command_html_a5d48cdb5f3f29c3414109af53db05817"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a5d48cdb5f3f29c3414109af53db05817">SpiCommand::kp_abad</a></div><div class="ttdeci">float kp_abad[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00019">SpineBoard.h:19</a></div></div>
<div class="ttc" id="struct_spi_command_html_a17e6d0a97149a586d66f49e97778d8aa"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a17e6d0a97149a586d66f49e97778d8aa">SpiCommand::kp_hip</a></div><div class="ttdeci">float kp_hip[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00020">SpineBoard.h:20</a></div></div>
<div class="ttc" id="class_leg_controller_html_a9eaf3553d6578f0eb244fed996dd2fe9"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a9eaf3553d6578f0eb244fed996dd2fe9">LegController::_legsEnabled</a></div><div class="ttdeci">bool _legsEnabled</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00072">LegController.h:72</a></div></div>
<div class="ttc" id="struct_spi_command_html_a830f6dfc6db3c67b2984a71e19268d9e"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#a830f6dfc6db3c67b2984a71e19268d9e">SpiCommand::tau_hip_ff</a></div><div class="ttdeci">float tau_hip_ff[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00028">SpineBoard.h:28</a></div></div>
<div class="ttc" id="struct_spi_command_html_aa4c7007b0e88ea1a64044d1f82195a5e"><div class="ttname"><a href="../../d0/ddd/struct_spi_command.html#aa4c7007b0e88ea1a64044d1f82195a5e">SpiCommand::qd_des_abad</a></div><div class="ttdeci">float qd_des_abad[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00015">SpineBoard.h:15</a></div></div>
<div class="ttc" id="class_leg_controller_html_a0989efb2b62a34f7cef3f4cf29b6783f"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">LegController::commands</a></div><div class="ttdeci">LegControllerCommand&lt; T &gt; commands[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00069">LegController.h:69</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-5" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-5-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-5-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-5-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d0/d96/class_leg_controller_aa6ed2e91e7d6eb3af84b26db593483b9_icgraph.png" border="0" usemap="#d0/d96/class_leg_controller_aa6ed2e91e7d6eb3af84b26db593483b9_icgraph" alt=""/></div>
<map name="d0/d96/class_leg_controller_aa6ed2e91e7d6eb3af84b26db593483b9_icgraph" id="d0/d96/class_leg_controller_aa6ed2e91e7d6eb3af84b26db593483b9_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aadd629fdf9a938a2ff4728b9292e4bc2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::updateCommand </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d8/d03/struct_ti_board_command.html">TiBoardCommand</a> *&#160;</td>
          <td class="paramname"><em>tiBoardCommand</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Update the "leg command" for the TI Board </p>

<p>Definition at line <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html#l00180">180</a> of file <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html">LegController.cpp</a>.</p>

<p>References <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00016">TiBoardCommand::enable</a>, <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00014">TiBoardCommand::force_ff</a>, <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00013">TiBoardCommand::kd</a>, <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00012">TiBoardCommand::kp</a>, <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00017">TiBoardCommand::max_torque</a>, <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00010">TiBoardCommand::position_des</a>, <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00015">TiBoardCommand::tau_ff</a>, and <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00011">TiBoardCommand::velocity_des</a>.</p>
<div class="fragment"><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;                                                                   {</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;T&gt;</a> tauFF = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].tauFeedForward.template cast&lt;T&gt;();</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    tauFF += <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kpJoint * (<a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qDes - <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].q) +</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;             <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdJoint * (<a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].qdDes - <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].qd);</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> joint = 0; joint &lt; 3; joint++) {</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;      tiBoardCommand[leg].<a class="code" href="../../d8/d03/struct_ti_board_command.html#a1cceb8b3d396de973e195971a9aba3b1">kp</a>[joint] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kpCartesian(joint, joint);</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;      tiBoardCommand[leg].<a class="code" href="../../d8/d03/struct_ti_board_command.html#a24cc094d5bc085948a157766844f556b">kd</a>[joint] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].kdCartesian(joint, joint);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;      tiBoardCommand[leg].<a class="code" href="../../d8/d03/struct_ti_board_command.html#aed1ae639325c878829a4d3ffd58184be">tau_ff</a>[joint] = tauFF[joint];</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;      tiBoardCommand[leg].<a class="code" href="../../d8/d03/struct_ti_board_command.html#ae3964e6f3467faf2f211cb6f3d4a86af">position_des</a>[joint] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].pDes[joint];</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;      tiBoardCommand[leg].<a class="code" href="../../d8/d03/struct_ti_board_command.html#a3aa634040ada4f6f9fa6eb43472e0f5e">velocity_des</a>[joint] = <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].vDes[joint];</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;      tiBoardCommand[leg].<a class="code" href="../../d8/d03/struct_ti_board_command.html#a4ebe624e78c04ef728d2cac3e265e969">force_ff</a>[joint] =</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;          <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>[leg].forceFeedForward[joint];</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    }</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    tiBoardCommand[leg].<a class="code" href="../../d8/d03/struct_ti_board_command.html#a7f848ae35717601f1698d817740b729d">enable</a> = <a class="code" href="../../d0/d96/class_leg_controller.html#a9eaf3553d6578f0eb244fed996dd2fe9">_legsEnabled</a> ? 1 : 0;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    tiBoardCommand[leg].<a class="code" href="../../d8/d03/struct_ti_board_command.html#a7da5c7d517f9dd1185204fb76d244e58">max_torque</a> = <a class="code" href="../../d0/d96/class_leg_controller.html#a7d346be43debdb28740518f7a4de4f16">_maxTorque</a>;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;  }</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;}</div><div class="ttc" id="struct_ti_board_command_html_a7da5c7d517f9dd1185204fb76d244e58"><div class="ttname"><a href="../../d8/d03/struct_ti_board_command.html#a7da5c7d517f9dd1185204fb76d244e58">TiBoardCommand::max_torque</a></div><div class="ttdeci">float max_torque</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00017">ti_boardcontrol.h:17</a></div></div>
<div class="ttc" id="struct_ti_board_command_html_a24cc094d5bc085948a157766844f556b"><div class="ttname"><a href="../../d8/d03/struct_ti_board_command.html#a24cc094d5bc085948a157766844f556b">TiBoardCommand::kd</a></div><div class="ttdeci">float kd[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00013">ti_boardcontrol.h:13</a></div></div>
<div class="ttc" id="struct_ti_board_command_html_aed1ae639325c878829a4d3ffd58184be"><div class="ttname"><a href="../../d8/d03/struct_ti_board_command.html#aed1ae639325c878829a4d3ffd58184be">TiBoardCommand::tau_ff</a></div><div class="ttdeci">float tau_ff[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00015">ti_boardcontrol.h:15</a></div></div>
<div class="ttc" id="struct_ti_board_command_html_a1cceb8b3d396de973e195971a9aba3b1"><div class="ttname"><a href="../../d8/d03/struct_ti_board_command.html#a1cceb8b3d396de973e195971a9aba3b1">TiBoardCommand::kp</a></div><div class="ttdeci">float kp[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00012">ti_boardcontrol.h:12</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="class_leg_controller_html_acc73b19fc4f23265cc857cb94b49f7b3"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">LegController::datas</a></div><div class="ttdeci">LegControllerData&lt; T &gt; datas[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00070">LegController.h:70</a></div></div>
<div class="ttc" id="struct_ti_board_command_html_a3aa634040ada4f6f9fa6eb43472e0f5e"><div class="ttname"><a href="../../d8/d03/struct_ti_board_command.html#a3aa634040ada4f6f9fa6eb43472e0f5e">TiBoardCommand::velocity_des</a></div><div class="ttdeci">float velocity_des[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00011">ti_boardcontrol.h:11</a></div></div>
<div class="ttc" id="class_leg_controller_html_a7d346be43debdb28740518f7a4de4f16"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a7d346be43debdb28740518f7a4de4f16">LegController::_maxTorque</a></div><div class="ttdeci">T _maxTorque</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00073">LegController.h:73</a></div></div>
<div class="ttc" id="class_leg_controller_html_a9eaf3553d6578f0eb244fed996dd2fe9"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a9eaf3553d6578f0eb244fed996dd2fe9">LegController::_legsEnabled</a></div><div class="ttdeci">bool _legsEnabled</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00072">LegController.h:72</a></div></div>
<div class="ttc" id="struct_ti_board_command_html_a7f848ae35717601f1698d817740b729d"><div class="ttname"><a href="../../d8/d03/struct_ti_board_command.html#a7f848ae35717601f1698d817740b729d">TiBoardCommand::enable</a></div><div class="ttdeci">s32 enable</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00016">ti_boardcontrol.h:16</a></div></div>
<div class="ttc" id="struct_ti_board_command_html_a4ebe624e78c04ef728d2cac3e265e969"><div class="ttname"><a href="../../d8/d03/struct_ti_board_command.html#a4ebe624e78c04ef728d2cac3e265e969">TiBoardCommand::force_ff</a></div><div class="ttdeci">float force_ff[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00014">ti_boardcontrol.h:14</a></div></div>
<div class="ttc" id="struct_ti_board_command_html_ae3964e6f3467faf2f211cb6f3d4a86af"><div class="ttname"><a href="../../d8/d03/struct_ti_board_command.html#ae3964e6f3467faf2f211cb6f3d4a86af">TiBoardCommand::position_des</a></div><div class="ttdeci">float position_des[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00010">ti_boardcontrol.h:10</a></div></div>
<div class="ttc" id="class_leg_controller_html_a0989efb2b62a34f7cef3f4cf29b6783f"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">LegController::commands</a></div><div class="ttdeci">LegControllerCommand&lt; T &gt; commands[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00069">LegController.h:69</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aec19eaa7a02abc15dba5106b82c5a8bc"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::updateData </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d5/d09/struct_spi_data.html">SpiData</a> *&#160;</td>
          <td class="paramname"><em>spiData</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Update the "leg data" from a SPIne board message </p>

<p>Definition at line <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html#l00083">83</a> of file <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html">LegController.cpp</a>.</p>

<p>References <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00035">SpiData::q_abad</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00036">SpiData::q_hip</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00037">SpiData::q_knee</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00038">SpiData::qd_abad</a>, <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00039">SpiData::qd_hip</a>, and <a class="el" href="../../d0/d6a/_spine_board_8h_source.html#l00040">SpiData::qd_knee</a>.</p>
<div class="fragment"><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                                                        {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="comment">// q:</span></div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].q(0) = spiData-&gt;<a class="code" href="../../d5/d09/struct_spi_data.html#afc88f10c94dc79b05e984aa7ed927d8b">q_abad</a>[leg];</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].q(1) = spiData-&gt;<a class="code" href="../../d5/d09/struct_spi_data.html#a55471fdb44f070c4e9c6ef4b128d0f9c">q_hip</a>[leg];</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].q(2) = spiData-&gt;<a class="code" href="../../d5/d09/struct_spi_data.html#a61b173572d313d693cb37aa346cbd4b2">q_knee</a>[leg];</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="comment">// qd</span></div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].qd(0) = spiData-&gt;<a class="code" href="../../d5/d09/struct_spi_data.html#acabffbc789cc4b3dbe876dadde510498">qd_abad</a>[leg];</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].qd(1) = spiData-&gt;<a class="code" href="../../d5/d09/struct_spi_data.html#af6aa9e4ce4989d485f2170af59bf84cf">qd_hip</a>[leg];</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].qd(2) = spiData-&gt;<a class="code" href="../../d5/d09/struct_spi_data.html#a97d6ab668da0a2f52b11468508b715ef">qd_knee</a>[leg];</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="comment">// J and p</span></div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    computeLegJacobianAndPosition&lt;T&gt;(<a class="code" href="../../d0/d96/class_leg_controller.html#a1a53bbec70a5b55928d83c5e86fc76e8">_quadruped</a>, <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].q, &amp;(<a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].J),</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                                     &amp;(<a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].p), leg);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="comment">// v</span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].v = <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].J * <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].qd;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  }</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;}</div><div class="ttc" id="struct_spi_data_html_a61b173572d313d693cb37aa346cbd4b2"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#a61b173572d313d693cb37aa346cbd4b2">SpiData::q_knee</a></div><div class="ttdeci">float q_knee[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00037">SpineBoard.h:37</a></div></div>
<div class="ttc" id="struct_spi_data_html_a55471fdb44f070c4e9c6ef4b128d0f9c"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#a55471fdb44f070c4e9c6ef4b128d0f9c">SpiData::q_hip</a></div><div class="ttdeci">float q_hip[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00036">SpineBoard.h:36</a></div></div>
<div class="ttc" id="class_leg_controller_html_acc73b19fc4f23265cc857cb94b49f7b3"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">LegController::datas</a></div><div class="ttdeci">LegControllerData&lt; T &gt; datas[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00070">LegController.h:70</a></div></div>
<div class="ttc" id="class_leg_controller_html_a1a53bbec70a5b55928d83c5e86fc76e8"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a1a53bbec70a5b55928d83c5e86fc76e8">LegController::_quadruped</a></div><div class="ttdeci">Quadruped&lt; T &gt; &amp; _quadruped</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00071">LegController.h:71</a></div></div>
<div class="ttc" id="struct_spi_data_html_afc88f10c94dc79b05e984aa7ed927d8b"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#afc88f10c94dc79b05e984aa7ed927d8b">SpiData::q_abad</a></div><div class="ttdeci">float q_abad[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00035">SpineBoard.h:35</a></div></div>
<div class="ttc" id="struct_spi_data_html_acabffbc789cc4b3dbe876dadde510498"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#acabffbc789cc4b3dbe876dadde510498">SpiData::qd_abad</a></div><div class="ttdeci">float qd_abad[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00038">SpineBoard.h:38</a></div></div>
<div class="ttc" id="struct_spi_data_html_af6aa9e4ce4989d485f2170af59bf84cf"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#af6aa9e4ce4989d485f2170af59bf84cf">SpiData::qd_hip</a></div><div class="ttdeci">float qd_hip[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00039">SpineBoard.h:39</a></div></div>
<div class="ttc" id="struct_spi_data_html_a97d6ab668da0a2f52b11468508b715ef"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#a97d6ab668da0a2f52b11468508b715ef">SpiData::qd_knee</a></div><div class="ttdeci">float qd_knee[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00040">SpineBoard.h:40</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-6" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-6-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-6-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-6-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d0/d96/class_leg_controller_aec19eaa7a02abc15dba5106b82c5a8bc_icgraph.png" border="0" usemap="#d0/d96/class_leg_controller_aec19eaa7a02abc15dba5106b82c5a8bc_icgraph" alt=""/></div>
<map name="d0/d96/class_leg_controller_aec19eaa7a02abc15dba5106b82c5a8bc_icgraph" id="d0/d96/class_leg_controller_aec19eaa7a02abc15dba5106b82c5a8bc_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a9989702479e649e0d700a29be7e3185b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::updateData </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../de/de1/struct_ti_board_data.html">TiBoardData</a> *&#160;</td>
          <td class="paramname"><em>tiBoardData</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Update the "leg data" from a TI Board message </p>

<p>Definition at line <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html#l00108">108</a> of file <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html">LegController.cpp</a>.</p>

<p>References <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00025">TiBoardData::dq</a>, <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00021">TiBoardData::position</a>, <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00024">TiBoardData::q</a>, <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00026">TiBoardData::tau</a>, and <a class="el" href="../../d9/d42/ti__boardcontrol_8h_source.html#l00022">TiBoardData::velocity</a>.</p>
<div class="fragment"><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;                                                                {</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> joint = 0; joint &lt; 3; joint++) {</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;      <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].q(joint) = tiBoardData[leg].<a class="code" href="../../de/de1/struct_ti_board_data.html#abbd604ce0592a16aeff781483306034f">q</a>[joint];</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;      <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].qd(joint) = tiBoardData[leg].<a class="code" href="../../de/de1/struct_ti_board_data.html#a59bdb52d482a8cf13b0eefe34760b530">dq</a>[joint];</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;      <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].p(joint) = tiBoardData[leg].<a class="code" href="../../de/de1/struct_ti_board_data.html#a9b8bb8e37b5a744343c42683a63a5b5f">position</a>[joint];</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;      <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].v(joint) = tiBoardData[leg].<a class="code" href="../../de/de1/struct_ti_board_data.html#a771df24317bbe9e29d097c379b441750">velocity</a>[joint];</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;      computeLegJacobianAndPosition&lt;T&gt;(<a class="code" href="../../d0/d96/class_leg_controller.html#a1a53bbec70a5b55928d83c5e86fc76e8">_quadruped</a>, <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].q, &amp;<a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].J,</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                                       <span class="keyword">nullptr</span>, leg);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;      <a class="code" href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">datas</a>[leg].tauEstimate[joint] = tiBoardData[leg].<a class="code" href="../../de/de1/struct_ti_board_data.html#a23920e775730ce3be781cc666cff0143">tau</a>[joint];</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    }</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  }</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;}</div><div class="ttc" id="class_leg_controller_html_acc73b19fc4f23265cc857cb94b49f7b3"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#acc73b19fc4f23265cc857cb94b49f7b3">LegController::datas</a></div><div class="ttdeci">LegControllerData&lt; T &gt; datas[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00070">LegController.h:70</a></div></div>
<div class="ttc" id="struct_ti_board_data_html_abbd604ce0592a16aeff781483306034f"><div class="ttname"><a href="../../de/de1/struct_ti_board_data.html#abbd604ce0592a16aeff781483306034f">TiBoardData::q</a></div><div class="ttdeci">float q[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00024">ti_boardcontrol.h:24</a></div></div>
<div class="ttc" id="struct_ti_board_data_html_a23920e775730ce3be781cc666cff0143"><div class="ttname"><a href="../../de/de1/struct_ti_board_data.html#a23920e775730ce3be781cc666cff0143">TiBoardData::tau</a></div><div class="ttdeci">float tau[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00026">ti_boardcontrol.h:26</a></div></div>
<div class="ttc" id="class_leg_controller_html_a1a53bbec70a5b55928d83c5e86fc76e8"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a1a53bbec70a5b55928d83c5e86fc76e8">LegController::_quadruped</a></div><div class="ttdeci">Quadruped&lt; T &gt; &amp; _quadruped</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00071">LegController.h:71</a></div></div>
<div class="ttc" id="struct_ti_board_data_html_a771df24317bbe9e29d097c379b441750"><div class="ttname"><a href="../../de/de1/struct_ti_board_data.html#a771df24317bbe9e29d097c379b441750">TiBoardData::velocity</a></div><div class="ttdeci">float velocity[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00022">ti_boardcontrol.h:22</a></div></div>
<div class="ttc" id="struct_ti_board_data_html_a9b8bb8e37b5a744343c42683a63a5b5f"><div class="ttname"><a href="../../de/de1/struct_ti_board_data.html#a9b8bb8e37b5a744343c42683a63a5b5f">TiBoardData::position</a></div><div class="ttdeci">float position[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00021">ti_boardcontrol.h:21</a></div></div>
<div class="ttc" id="struct_ti_board_data_html_a59bdb52d482a8cf13b0eefe34760b530"><div class="ttname"><a href="../../de/de1/struct_ti_board_data.html#a59bdb52d482a8cf13b0eefe34760b530">TiBoardData::dq</a></div><div class="ttdeci">float dq[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00025">ti_boardcontrol.h:25</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8fc971360d5ce54469d219c6aa4b51e4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::zeroCommand </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Zero all leg commands. This should be run <em>before</em> any control code, so if the control code is confused and doesn't change the leg command, the legs won't remember the last command. </p>

<p>Definition at line <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html#l00048">48</a> of file <a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html">LegController.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                                   {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; cmd : <a class="code" href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">commands</a>) {</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    cmd.zero();</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  }</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <a class="code" href="../../d0/d96/class_leg_controller.html#a9eaf3553d6578f0eb244fed996dd2fe9">_legsEnabled</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;}</div><div class="ttc" id="class_leg_controller_html_a9eaf3553d6578f0eb244fed996dd2fe9"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a9eaf3553d6578f0eb244fed996dd2fe9">LegController::_legsEnabled</a></div><div class="ttdeci">bool _legsEnabled</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00072">LegController.h:72</a></div></div>
<div class="ttc" id="class_leg_controller_html_a0989efb2b62a34f7cef3f4cf29b6783f"><div class="ttname"><a href="../../d0/d96/class_leg_controller.html#a0989efb2b62a34f7cef3f4cf29b6783f">LegController::commands</a></div><div class="ttdeci">LegControllerCommand&lt; T &gt; commands[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d41/_leg_controller_8h_source.html#l00069">LegController.h:69</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-7" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-7-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-7-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-7-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d0/d96/class_leg_controller_a8fc971360d5ce54469d219c6aa4b51e4_icgraph.png" border="0" usemap="#d0/d96/class_leg_controller_a8fc971360d5ce54469d219c6aa4b51e4_icgraph" alt=""/></div>
<map name="d0/d96/class_leg_controller_a8fc971360d5ce54469d219c6aa4b51e4_icgraph" id="d0/d96/class_leg_controller_a8fc971360d5ce54469d219c6aa4b51e4_icgraph">
</map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a9eaf3553d6578f0eb244fed996dd2fe9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::_legsEnabled = false</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d0/d41/_leg_controller_8h_source.html#l00072">72</a> of file <a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7d346be43debdb28740518f7a4de4f16"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::_maxTorque = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d0/d41/_leg_controller_8h_source.html#l00073">73</a> of file <a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a>.</p>

</div>
</div>
<a class="anchor" id="a1a53bbec70a5b55928d83c5e86fc76e8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d66/class_quadruped.html">Quadruped</a>&lt;T&gt;&amp; <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::_quadruped</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d0/d41/_leg_controller_8h_source.html#l00071">71</a> of file <a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0989efb2b62a34f7cef3f4cf29b6783f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/d6a/struct_leg_controller_command.html">LegControllerCommand</a>&lt;T&gt; <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::commands[4]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d0/d41/_leg_controller_8h_source.html#l00069">69</a> of file <a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a>.</p>

</div>
</div>
<a class="anchor" id="acc73b19fc4f23265cc857cb94b49f7b3"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d6e/struct_leg_controller_data.html">LegControllerData</a>&lt;T&gt; <a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a>&lt; T &gt;::datas[4]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d0/d41/_leg_controller_8h_source.html#l00070">70</a> of file <a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="../../d0/d41/_leg_controller_8h_source.html">LegController.h</a></li>
<li><a class="el" href="../../da/d2d/_leg_controller_8cpp_source.html">LegController.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d0/d96/class_leg_controller.html">LegController</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
